package com.walter.dynamic.thread.pool;

import lombok.Getter;

/**
 *  线程池指标类
 * @author Walter
 * @date 2025/2/7 下午5:03
 **/
@Getter
public class ThreadPoolMetrics {
    /**
     * 活跃线程数
     */
    private final int activeThreads;
    /**
     * 线程池大小
     */
    private final int poolSize;
    /**
     * 最大线程池大小
     */
    private final int maxPoolSize;
    /**
     * 队列大小
     */
    private final int queueSize;
    /**
     * 总任务数
     */
    private final long totalTasks;
    /**
     * 已完成任务数
     */
    private final long completedTasks;

    public ThreadPoolMetrics(int activeThreads, int poolSize,int maxPoolSize,
                             int queueSize, long totalTasks, long completedTasks) {
        this.activeThreads = activeThreads;
        this.poolSize = poolSize;
        this.maxPoolSize = maxPoolSize;
        this.queueSize = queueSize;
        this.totalTasks = totalTasks;
        this.completedTasks = completedTasks;
    }
}
